package main

import (
	"fmt"
)

func main() {

	myMap := make(map[string]string, 10)
	myMap["a"] = "b"
	value, exists := myMap["a"]
	if exists {
		println(value) // => b
	}

	for k, v := range myMap {
		println(k, v) // => a b
	}

	myFuncMap := map[string]func() int {
		"funcA": func() int { return 1 },
	}
	fmt.Println(myFuncMap) // => map[funcA:0x108a600]

	f := myFuncMap["funcA"]
	fmt.Println(f()) // => 1
}
